# coding: utf-8
from . import db, BaseModel


class Student(db.Model):
    __tablename__ = 'student'

    auto_id = db.Column(db.Integer, primary_key=True)
    student_id = db.Column(db.BigInteger, index=True, info='学号')
    password = db.Column(db.String(255, 'utf8mb4_general_ci'), info='密码')
    student_name = db.Column(db.String(255), info='学生姓名')
    avatar = db.Column(db.LargeBinary, info='头像')
    phone = db.Column(db.String(11), info='学生电话')
    lesson_id = db.Column(db.BigInteger, info='班级编号')
    is_delete = db.Column(db.Integer, server_default=db.FetchedValue())
    update_time = db.Column(db.DateTime, server_default=db.FetchedValue())
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue())
